4@The RichTextBox control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Using these properties, you can make text bold or italic, change the color, and create superscripts and subscripts. You can also adjust paragraph formatting by setting both left and right indents, as well as hanging indents. The RichTextBox also opens and saves files in both the RTF format and regular ASCII text format. You can use methods of the control (LoadFile and SaveFile) to directly read and write files, or use properties of the control such as SelRTF and TextRTF in conjunction with Visual Basic's file input/output statements. You can also load the contents of an .RTF file into the RichTextBox control simply by dragging the file (from the Windows 95 Explorer for example), or a highlighted portion of a file used in another application (such as Microsoft Word), and dropping the contents directly onto the control. You can also set the FileName property to load the contents of an .RTF or text file to the control. You can also print all or part of the text in a RichTextBox control using the SelPrint method. Because the RichTextBox is a data-bound control, you can bind it with a Data control to a Memo field in a Microsoft Access database or a similar large capacity text field in other databases (such as a TEXT data type field in SQL Server). The RichTextBox control supports almost all of the properties, events and methods used with the standard TextBox control, such as MaxLength, MultiLine, ScrollBars, SelLength, SelStart, and SelText. Applications that already use TextBox controls can easily be adapted to make use of RichTextBox controls. However, the RichTextBox control doesn't have the same 64K character capacity limit of the conventional TextBox control. Distribution Note The RichTextBox control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the RichTextBox control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.ÅReturns or sets the text of a RichTextBox control, including all .RTF code. Important This property requires the Microsoft Windows 95 or Microsoft Windows NT 3.51 operating system. Syntax object.TextRTF [= string] The TextRTF property syntax has these parts: Part Description object An object expression that evaluates to a RichTextBox control. string A string expression in .RTF format. Remarks Setting the TextRTF property replaces the entire contents of a RichTextBox control with the new string. You can use the TextRTF property along with the Print function to write .RTF files. The resulting file can be read by any other word processor capable of reading RTF-encoded text.–{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;\red255\green0\blue0;} \deflang1033\pard\plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Using these properties, you can make text \plain\f3\fs20\b bold\plain\f3\fs20 or \plain\f3\fs20\i italic\plain\f3\fs20 , change the \plain\f3\fs20\cf1 color\plain\f3\fs20 , and create superscripts and subscripts. You can also adjust paragraph formatting by setting both left and right indents, as well as hanging indents. \par \par The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 also opens and saves files in both the RTF format and regular ASCII text format. You can use methods of the control (\plain\f3\fs20\b LoadFile\plain\f3\fs20 and \plain\f3\fs20\b SaveFile\plain\f3\fs20 ) to directly read and write files, or use properties of the control such as \plain\f3\fs20\b SelRTF\plain\f3\fs20 and \plain\f3\fs20\b TextRTF\plain\f3\fs20 in conjunction with file input/output statements. You can also load the contents of an .RTF file into the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control simply by dragging the file (from the Windows 95 Explorer for example), or a highlighted portion of a file used in another application (such as Microsoft Word), and dropping the contents directly onto the control. You can also set the FileName property to load the contents of an .RTF or text file to the control. \par \par You can also print all or part of the text in a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control using the \plain\f3\fs20\b SelPrint\plain\f3\fs20 method. \par \plain\f3\fs18 \par } ™{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs20 Distribution Note The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } I{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs24\b TextRTF Property\plain\f3\fs20 \par \par Returns or sets the text of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control, including all .RTF code. \par \par \plain\f3\fs20\b Syntax\plain\f3\fs20 \par \par \plain\f3\fs20\i object\plain\f3\fs20 .TextRTF [= string] \par \par The \plain\f3\fs20\b TextRTF\plain\f3\fs20 property syntax has these parts: \par \par \plain\f3\fs20\b\ul Part\tab Description \par \plain\f3\fs20 \par \plain\f3\fs20\i object\plain\f3\fs20 \tab An object expression that evaluates to a RichTextBox control. \par \plain\f3\fs20\i string\plain\f3\fs20 \tab A string expression in .RTF format. \par \par \plain\f3\fs20\b Remarks\plain\f3\fs20 \par \par Setting the\plain\f3\fs20\b TextRTF\plain\f3\fs20 property replaces the entire contents of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control with the new string. \par You can use the \plain\f3\fs20\b TextRTF\plain\f3\fs20 property along with the \plain\f3\fs20\b Print\plain\f3\fs20 function to write .RTF files. The resulting file can be read by any other word processor capable of reading RTF-encoded text.\plain\f3\fs18 \par } Ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;\red255\green0\blue0;} \deflang1033\pard\qc\plain\f3\fs32\i The RichTextBox Control \par \pard\plain\f3\fs20 \par The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Using these properties, you can make text \plain\f3\fs20\b bold\plain\f3\fs20 or \plain\f3\fs20\i italic\plain\f3\fs20 , change the \plain\f3\fs20\cf1 color\plain\f3\fs20 , and create superscripts and subscripts. You can also adjust paragraph formatting by setting both left and right indents, as well as hanging indents. \par \par The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 also opens and saves files in both the RTF format and regular ASCII text format. You can use methods of the control (\plain\f3\fs20\b LoadFile\plain\f3\fs20 and \plain\f3\fs20\b SaveFile\plain\f3\fs20 ) to directly read and write files, or use properties of the control such as \plain\f3\fs20\b SelRTF\plain\f3\fs20 and \plain\f3\fs20\b TextRTF\plain\f3\fs20 in conjunction with file input/output statements. You can also load the contents of an .RTF file into the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control simply by dragging the file (from the Windows 95 Explorer for example), or a highlighted portion of a file used in another application (such as Microsoft Word), and dropping the contents directly onto the control. You can also set the FileName property to load the contents of an .RTF or text file to the control. \par \par You can also print all or part of the text in a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control using the \plain\f3\fs20\b SelPrint\plain\f3\fs20 method. \par \plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } Ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;\red255\green0\blue0;} \deflang1033\pard\qc\plain\f3\fs32\i The RichTextBox Control \par \pard\plain\f3\fs20 \par The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Using these properties, you can make text \plain\f3\fs20\b bold\plain\f3\fs20 or \plain\f3\fs20\i italic\plain\f3\fs20 , change the \plain\f3\fs20\cf1 color\plain\f3\fs20 , and create superscripts and subscripts. You can also adjust paragraph formatting by setting both left and right indents, as well as hanging indents. \par \par The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 also opens and saves files in both the RTF format and regular ASCII text format. You can use methods of the control (\plain\f3\fs20\b LoadFile\plain\f3\fs20 and \plain\f3\fs20\b SaveFile\plain\f3\fs20 ) to directly read and write files, or use properties of the control such as \plain\f3\fs20\b SelRTF\plain\f3\fs20 and \plain\f3\fs20\b TextRTF\plain\f3\fs20 in conjunction with file input/output statements. You can also load the contents of an .RTF file into the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control simply by dragging the file (from the Windows 95 Explorer for example), or a highlighted portion of a file used in another application (such as Microsoft Word), and dropping the contents directly onto the control. You can also set the FileName property to load the contents of an .RTF or text file to the control. \par \par You can also print all or part of the text in a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control using the \plain\f3\fs20\b SelPrint\plain\f3\fs20 method. \par \plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } I{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs24\b TextRTF Property\plain\f3\fs20 \par \par Returns or sets the text of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control, including all .RTF code. \par \par \plain\f3\fs20\b Syntax\plain\f3\fs20 \par \par \plain\f3\fs20\i object\plain\f3\fs20 .TextRTF [= string] \par \par The \plain\f3\fs20\b TextRTF\plain\f3\fs20 property syntax has these parts: \par \par \plain\f3\fs20\b\ul Part\tab Description \par \plain\f3\fs20 \par \plain\f3\fs20\i object\plain\f3\fs20 \tab An object expression that evaluates to a RichTextBox control. \par \plain\f3\fs20\i string\plain\f3\fs20 \tab A string expression in .RTF format. \par \par \plain\f3\fs20\b Remarks\plain\f3\fs20 \par \par Setting the\plain\f3\fs20\b TextRTF\plain\f3\fs20 property replaces the entire contents of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control with the new string. \par You can use the \plain\f3\fs20\b TextRTF\plain\f3\fs20 property along with the \plain\f3\fs20\b Print\plain\f3\fs20 function to write .RTF files. The resulting file can be read by any other word processor capable of reading RTF-encoded text.\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } Ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;\red255\green0\blue0;} \deflang1033\pard\qc\plain\f3\fs32\i The RichTextBox Control \par \pard\plain\f3\fs20 \par The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Using these properties, you can make text \plain\f3\fs20\b bold\plain\f3\fs20 or \plain\f3\fs20\i italic\plain\f3\fs20 , change the \plain\f3\fs20\cf1 color\plain\f3\fs20 , and create superscripts and subscripts. You can also adjust paragraph formatting by setting both left and right indents, as well as hanging indents. \par \par The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 also opens and saves files in both the RTF format and regular ASCII text format. You can use methods of the control (\plain\f3\fs20\b LoadFile\plain\f3\fs20 and \plain\f3\fs20\b SaveFile\plain\f3\fs20 ) to directly read and write files, or use properties of the control such as \plain\f3\fs20\b SelRTF\plain\f3\fs20 and \plain\f3\fs20\b TextRTF\plain\f3\fs20 in conjunction with file input/output statements. You can also load the contents of an .RTF file into the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control simply by dragging the file (from the Windows 95 Explorer for example), or a highlighted portion of a file used in another application (such as Microsoft Word), and dropping the contents directly onto the control. You can also set the FileName property to load the contents of an .RTF or text file to the control. \par \par You can also print all or part of the text in a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control using the \plain\f3\fs20\b SelPrint\plain\f3\fs20 method. \par \plain\f3\fs18 \par } Ð{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs18 \par } Ð{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } I{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs24\b TextRTF Property\plain\f3\fs20 \par \par Returns or sets the text of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control, including all .RTF code. \par \par \plain\f3\fs20\b Syntax\plain\f3\fs20 \par \par \plain\f3\fs20\i object\plain\f3\fs20 .TextRTF [= string] \par \par The \plain\f3\fs20\b TextRTF\plain\f3\fs20 property syntax has these parts: \par \par \plain\f3\fs20\b\ul Part\tab Description \par \plain\f3\fs20 \par \plain\f3\fs20\i object\plain\f3\fs20 \tab An object expression that evaluates to a RichTextBox control. \par \plain\f3\fs20\i string\plain\f3\fs20 \tab A string expression in .RTF format. \par \par \plain\f3\fs20\b Remarks\plain\f3\fs20 \par \par Setting the\plain\f3\fs20\b TextRTF\plain\f3\fs20 property replaces the entire contents of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control with the new string. \par You can use the \plain\f3\fs20\b TextRTF\plain\f3\fs20 property along with the \plain\f3\fs20\b Print\plain\f3\fs20 function to write .RTF files. The resulting file can be read by any other word processor capable of reading RTF-encoded text.\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } Ð{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } Ð{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } I{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs24\b TextRTF Property\plain\f3\fs20 \par \par Returns or sets the text of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control, including all .RTF code. \par \par \plain\f3\fs20\b Syntax\plain\f3\fs20 \par \par \plain\f3\fs20\i object\plain\f3\fs20 .TextRTF [= string] \par \par The \plain\f3\fs20\b TextRTF\plain\f3\fs20 property syntax has these parts: \par \par \plain\f3\fs20\b\ul Part\tab Description \par \plain\f3\fs20 \par \plain\f3\fs20\i object\plain\f3\fs20 \tab An object expression that evaluates to a RichTextBox control. \par \plain\f3\fs20\i string\plain\f3\fs20 \tab A string expression in .RTF format. \par \par \plain\f3\fs20\b Remarks\plain\f3\fs20 \par \par Setting the\plain\f3\fs20\b TextRTF\plain\f3\fs20 property replaces the entire contents of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control with the new string. \par You can use the \plain\f3\fs20\b TextRTF\plain\f3\fs20 property along with the \plain\f3\fs20\b Print\plain\f3\fs20 function to write .RTF files. The resulting file can be read by any other word processor capable of reading RTF-encoded text.\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } Ð{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } I{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs24\b TextRTF Property\plain\f3\fs20 \par \par Returns or sets the text of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control, including all .RTF code. \par \par \plain\f3\fs20\b Syntax\plain\f3\fs20 \par \par \plain\f3\fs20\i object\plain\f3\fs20 .TextRTF [= string] \par \par The \plain\f3\fs20\b TextRTF\plain\f3\fs20 property syntax has these parts: \par \par \plain\f3\fs20\b\ul Part\tab Description \par \plain\f3\fs20 \par \plain\f3\fs20\i object\plain\f3\fs20 \tab An object expression that evaluates to a RichTextBox control. \par \plain\f3\fs20\i string\plain\f3\fs20 \tab A string expression in .RTF format. \par \par \plain\f3\fs20\b Remarks\plain\f3\fs20 \par \par Setting the\plain\f3\fs20\b TextRTF\plain\f3\fs20 property replaces the entire contents of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control with the new string. \par You can use the \plain\f3\fs20\b TextRTF\plain\f3\fs20 property along with the \plain\f3\fs20\b Print\plain\f3\fs20 function to write .RTF files. The resulting file can be read by any other word processor capable of reading RTF-encoded text.\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } W{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;\red255\green0\blue0;} \deflang1033\pard\li180\ri240\plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Using these properties, you can make text \plain\f3\fs20\b bold\plain\f3\fs20 or \plain\f3\fs20\i italic\plain\f3\fs20 , change the \plain\f3\fs20\cf1 color\plain\f3\fs20 , and create superscripts and subscripts. You can also adjust paragraph formatting by setting both left and right indents, as well as hanging indents. \par \plain\f2\fs24 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 also opens and saves files in both the RTF format and regular ASCII text format. You can use methods of the control (\plain\f3\fs20\b LoadFile\plain\f3\fs20 and \plain\f3\fs20\b SaveFile\plain\f3\fs20 ) to directly read and write files, or use properties of the control such as \plain\f3\fs20\b SelRTF\plain\f3\fs20 and \plain\f3\fs20\b TextRTF\plain\f3\fs20 in conjunction with Visual Basic\rquote s file input/output statements. You can also load the contents of an .RTF file into the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control simply by dragging the file (from the Windows 95 Explorer for example), or a highlighted portion of a file used in another application (such as Microsoft Word), and dropping the contents directly onto the control. You can also set the \plain\f3\fs20\b FileName\plain\f3\fs20 property to load the contents of an .RTF or text file to the control.\plain\f2\fs24 \par \pard\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } P{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;\red255\green0\blue0;} \deflang1033\pard\li180\ri240\plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control provides a number of properties you can use to apply formatting to any portion of text within the control. To change the formatting of text, it must first be selected. Only selected text can be assigned character and paragraph formatting. Using these properties, you can make text \plain\f3\fs20\b bold\plain\f3\fs20 or \plain\f3\fs20\i italic\plain\f3\fs20 , change the \plain\f3\fs20\cf1 color\plain\f3\fs20 , and create superscripts and subscripts. You can also adjust paragraph formatting by setting both left and right indents, as well as hanging indents. \par \plain\f3\fs24 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 also opens and saves files in both the RTF format and regular ASCII text format. You can use methods of the control (\plain\f3\fs20\b LoadFile\plain\f3\fs20 and \plain\f3\fs20\b SaveFile\plain\f3\fs20 ) to directly read and write files, or use properties of the control such as \plain\f3\fs20\b SelRTF\plain\f3\fs20 and \plain\f3\fs20\b TextRTF\plain\f3\fs20 in conjunction with Visual Basic's file input/output statements. You can also load the contents of an .RTF file into the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control simply by dragging the file (from the Windows 95 Explorer for example), or a highlighted portion of a file used in another application (such as Microsoft Word), and dropping the contents directly onto the control. You can also set the \plain\f3\fs20\b FileName\plain\f3\fs20 property to load the contents of an .RTF or text file to the control.\plain\f3\fs24 \par \pard\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par } i{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}} {\colortbl\red0\green0\blue0;} \deflang1033\pard\plain\f3\fs24\b TextRTF Property\plain\f3\fs20 \par \par Returns or sets the text of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control, including all .RTF code. \par \par \plain\f3\fs20\b Syntax\plain\f3\fs20 \par \par \plain\f3\fs20\i object\plain\f3\fs20 .TextRTF [= \plain\f3\fs20\i string\plain\f3\fs20 ] \par \par The \plain\f3\fs20\b TextRTF\plain\f3\fs20 property syntax has these parts: \par \par \plain\f3\fs20\b\ul Part\tab Description \par \plain\f3\fs20 \par \plain\f3\fs20\i object\plain\f3\fs20 \tab An object expression that evaluates to a RichTextBox control. \par \plain\f3\fs20\i string\plain\f3\fs20 \tab A string expression in .RTF format. \par \par \plain\f3\fs20\b Remarks\plain\f3\fs20 \par \par Setting the\plain\f3\fs20\b TextRTF\plain\f3\fs20 property replaces the entire contents of a \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control with the new string. \par You can use the \plain\f3\fs20\b TextRTF\plain\f3\fs20 property along with the \plain\f3\fs20\b Print\plain\f3\fs20 function to write .RTF files. The resulting file can be read by any other word processor capable of reading RTF-encoded text.\plain\f3\fs18 \par } ô{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}{\f4\fswiss Courier New;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \deflang1033\pard\plain\f4\fs28\cf1 Distribution Note \par \plain\f4\fs20 \par \plain\f3\fs20 The \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control is a 32-bit custom control that can only run on 32-bit systems, such as Windows 95 and Windows NT 3.51 or higher. To use the \plain\f3\fs20\b RichTextBox\plain\f3\fs20 control in your application, you must add the RICHTX32.OCX file to the project. When distributing your application, install the RICHTX32.OCX file in the user's Microsoft Windows SYSTEM directory.\plain\f3\fs18 \par }